package com.yanqu.road.entity.activity.stronghold;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

@FieldTypeAnnotation(tableName = "t_u_activity_stronghold_upload_mark")
public class StrongholdUploadMark extends DataObject {
    @FieldTypeAnnotation(select = true,update = true)
    private int activityId;
    @FieldTypeAnnotation(update = true)
    private int groupId;
    @FieldTypeAnnotation(update = true)
    private int round;
    @FieldTypeAnnotation
    private boolean upload;
    @FieldTypeAnnotation
    private Set<String> qualifyUnionList = new HashSet<>();
    @FieldTypeAnnotation
    private long lastUploadTime;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        this.round = round;
    }

    public boolean isUpload() {
        return upload;
    }

    public void setUpload(boolean upload) {
        this.upload = upload;
        setUpdateOption();
    }

    public Set<String> getQualifyUnionList() {
        return qualifyUnionList;
    }

    public void setQualifyUnionList(Set<String> qualifyUnionList) {
        this.qualifyUnionList = qualifyUnionList;
    }

    public void clearUnion() {
        this.qualifyUnionList.clear();
        setUpdateOption();
    }

    public void addQualifyUnion(String unionId) {
        qualifyUnionList.add(unionId);
        setUpdateOption();
    }

    public long getLastUploadTime() {
        return lastUploadTime;
    }

    public void setLastUploadTime(long lastUploadTime) {
        this.lastUploadTime = lastUploadTime;
        setUpdateOption();
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }
}
